<template>
<div class="iframe-wrapper">
  <v-header
    :title='this.$route.query.address + "的手绘地图"'
    ref="VHeaderHeight"
    :style="{height: height + 'px'}">
  </v-header>
  
  <div class="iframeMap" :style="{height: heightMap + 'px'}">
    <iframe :src='this.$route.query.src' width="100%" height="100%" frameborder="0"></iframe>
  </div>

</div>
</template>

<script>
import VHeader from '@/components/v-header/v-header'
import commentBanneListTopBgImg from '@/assets/img/cart_headerBg.png'
import { isIphoneX } from '@/assets/js/brower.js'

export default {
  data() {
    return {
      commentBanneListTopBgImg
    }
  },
  components: {
    VHeader
  },
  created () {
    this.height = 0
    this.heightMap = 0
    if (isIphoneX()) {
      this.height = 74
      this.heightMap = window.innerHeight - 74
    } else {
      this.height = 64
      this.heightMap = window.innerHeight - 64
    }
  }
}
</script>

<style lang="stylus" scoped>
.iframe-wrapper
  position fixed
  top 0
  left 0
  right 0
  bottom 0
</style>

